<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>鼠标双击间隔时间测量</title>
	</head>
	<body>
		<script type="text/javascript">
			var last, flag = 0;
			document.onclick = function(){
				if(flag){
					var date = new Date();
					alert(""+date.getTime()-last+"毫秒");
					flag = 0;
				}
				else{
					var date = new Date();
					last = date.getTime();
					flag = 1; 
				}
			}
		</script>
	</body>
</html>
